import { IMenuRoutes } from './element'

const metaRouters: Record<string, { default: IMenuRoutes }> = import.meta.glob('./modules/*.tsx', { eager: true })

// 路由处理
export const routerArray: IMenuRoutes[] = [];

for (const key in metaRouters) {
    const data: { default: IMenuRoutes } = metaRouters[key]
    routerArray.push(data.default)
}

export default routerArray